package fr.inserm.u915.tabixserver;

public abstract class Named
	{
	private String label;
	private String description;
	private String id;
	
	protected Named()
		{
		
		}
	
	public String getId()
		{
		return id;
		}


	public void setId(String id)
		{
		this.id = id;
		}
	
	public String getLabel()
		{
		return label==null || label.isEmpty()?getId():label;
		}
	
	public void setLabel(String label) {
		this.label = label;
		}
	
	public String getDescription() {
		return description==null || description.isEmpty()?getLabel():this.description;
		}
	
	public void setDescription(String description) {
		this.description = description;
		}
	@Override
	public String toString() {
		return String.valueOf(getLabel());
		}
	}
